﻿using System;
using System.IO;
using System.Security.AccessControl;

namespace CsharpTool.FileAccess1
{
    public class FileAccessTool
    {
        public static (bool, string) SetFileAccess(string path)
        {
            try
            {
                if (File.Exists(path))
                {
                    var file = new FileInfo(path);
                    var fileSecurity = file.GetAccessControl(AccessControlSections.All);
                }
                else if (Directory.Exists(path))
                {
                    
                }
                else
                    return (false, "invalid path");
            }
            catch(Exception e)
            {
                return (false, e.Message);
            }

            return (true, "");
        }
    }
}
